﻿@model MobileSales.Model.Params.Param


@{
    View.Title = Strings.Parameters + " - " + Strings.Details;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Parameters &nbsp;&raquo;&nbsp; @Strings.Details</h2>

<fieldset>
    <legend>@Strings.Fields</legend>

    <div class="display-label">@ModelStrings.Name</div>
    <div class="display-field">@Model.Name</div>

    <div class="display-label">@ModelStrings.DisplayName</div>
    <div class="display-field">@Model.DisplayName</div>

    <div class="display-label">@ModelStrings.Description</div>
    <div class="display-field">@Model.Description</div>

    <div class="display-label">@ModelStrings.IsReadOnly</div>
    <div class="display-field">@(Model.IsReadOnly ? Strings.Yes : Strings.No)</div>

    <div class="display-label">@ModelStrings.IsRequired</div>
    <div class="display-field">@(Model.IsRequired ? Strings.Yes : Strings.No)</div>

    <div class="display-label">@ModelStrings.FieldType</div>
    <div class="display-field">@Model.FieldType</div>

    <div class="display-label">@ModelStrings.DefaultValue</div>
    @if (Model.FieldType != MobileSales.Model.Params.FieldType.Dictionary)
    {
        <div class="display-field">@Model.DefaultValue</div>
    }
    else
    {
        <div class="display-field">@Html.ParseDictionary(Model.DefaultValue)</div>
    }

    @if (Model.MaxLength.HasValue)
    {
    <div class="display-label">@ModelStrings.MaxLength</div>
    <div class="display-field">@Model.MaxLength</div>
    }

    <div class="display-label">@ModelStrings.ParamType</div>
    <div class="display-field">@Model.ParamType.ToString()</div>
</fieldset>
<p>
    @Html.ActionLink(Strings.Edit, "Edit", new { id = Model.Id }, new { @class = "icon-button edit-icon" }) |
   @Html.ActionLink(Strings.BackToList, "Index", null, new { @class = "icon-button prev-icon" })
</p>
